
package cn.fintecher.pangolin.entity.mysql;

import cn.fintecher.pangolin.common.enums.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;


@Data
@Entity
@Table(name = "case_info")
@ApiModel(value = "case_info", description = "案件基本信息")
public class CaseInfo {
    @ApiModelProperty(value = "主键ID")
    @Id
    private String id;

    @ApiModelProperty(notes = "批次号")
    private String batchNumber;

    @ApiModelProperty(notes = "委案城市")
    private String city;

    @ApiModelProperty(notes = "案件编号")
    private String caseNumber;

    @ApiModelProperty(notes = "客户ID")
    private String personalId;

    @ApiModelProperty(notes = "姓名")
    private String personalName;

    @ApiModelProperty(value = "性别")
    private String sex;

    @ApiModelProperty(notes = "电话")
    private String phone;

    @ApiModelProperty(notes = "地址")
    private String address;

    @ApiModelProperty(notes = "单位名称")
    private String employerName;

    @ApiModelProperty(notes = "证件号")
    private String certificateNo;

    @ApiModelProperty(notes = "帐号")
    private String account;

    @ApiModelProperty(value = "委案阶段")
    private String stage;

    @ApiModelProperty(notes = "入催日期")
    private Date remindersDate;

    @ApiModelProperty(notes = "逾期期数")
    private Integer overduePeriods;

    @ApiModelProperty(notes = "逾期天数")
    private Integer overdueDays;

    @ApiModelProperty(notes = "卡号")
    private String cardNo;

    @ApiModelProperty(notes = "卡类型")
    private String cardNoType;

    @ApiModelProperty(notes = "开户日期")
    private Date openCardDate;

    @ApiModelProperty(notes = "停卡日期")
    private Date stopCardDate;

    @ApiModelProperty(notes = "账单日")
    private String billDay;

    @ApiModelProperty(notes = "卡额度")
    private Double limitAmt;

    @ApiModelProperty(notes = "分行")
    private String branch;

    @ApiModelProperty(notes = "支行")
    private String subBranch;

    @ApiModelProperty(notes = "委案金额")
    private Double overdueAmtTotal;

    @ApiModelProperty(notes = "欠款金额")
    private Double leftAmt;

    @ApiModelProperty(notes = "最后还款金额")
    private Double latestPayAmt;

    @ApiModelProperty(notes = "还款总金额")
    private Double payAmountTotal;

    @ApiModelProperty(notes = "更新日期(余额/对账)")
    private Date latelyUpdateDate;

    @ApiModelProperty(notes = "委托方id标")
    private String principalId;

    @ApiModelProperty(notes = "委托方")
    private String principalName;

    @ApiModelProperty(notes = "流入日期")
    private Date followInTime;

    @ApiModelProperty(notes = "对账前案件状态")
    @Enumerated(EnumType.STRING)
    private CaseDataStatus caseStatus;

    @ApiModelProperty(notes = "手动状态")
    private String collectionStatus;

    @ApiModelProperty(notes = "颜色")
    private String color;

    @ApiModelProperty(notes = "催计数 记录当前催收员的催记数")
    private Integer collectionRecordCount = 0;

    @ApiModelProperty(notes = "催计数总数 记录全部催记数")
    private Integer collectionTotalRecordCount = 0;

    @ApiModelProperty(notes = "外访数")
    private Integer addrRecordCount = 0;

    @ApiModelProperty(notes = "电催数")
    private Integer telRecordCount = 0;

    @ApiModelProperty(notes = "查找数")
    private Integer findRecordCount = 0;

    @ApiModelProperty(notes = "跟进日期")
    private Date followTime;

    @ApiModelProperty(notes = "留案标识")
    @Enumerated(EnumType.STRING)
    private CaseLeaveFlag leaveFlag = CaseLeaveFlag.NO_LEAVE;

    @ApiModelProperty(notes = "留案到期日期")
    private Date leaveExpireDate;

    @ApiModelProperty("是否协催")
    @Enumerated(EnumType.STRING)
    private BaseSelect isAssist = BaseSelect.NO;

    @ApiModelProperty(notes = "数据状态")
    @Enumerated(EnumType.STRING)
    private CaseDataStatus caseDataStatus = CaseDataStatus.IN_POOL;

    @ApiModelProperty(notes = "联络结果")
    private String contactResult;

    @ApiModelProperty(value = "催收状态")
    private String collectStatus;

    @ApiModelProperty(value = "联系状态")
    private String contactStatus;

    @ApiModelProperty("还款状态")
    @Enumerated(EnumType.STRING)
    private PayStatus payStatus = PayStatus.UN_PAY;

    @ApiModelProperty(notes = "停催时间")
    private Date stopTime;

    @ApiModelProperty(notes = "承诺还款时间")
    private Date promiseDate;

    @ApiModelProperty(notes = "催收员")
    @OneToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "current_collector_id")
    private User currentCollector;

    @ApiModelProperty(notes = "机构")
    @OneToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "department_id")
    private Department department;

    @ApiModelProperty(value = "最后还款日期")
    private Date latestPayDate;

    @ApiModelProperty(notes = "操作员")
    private String operator;

    @ApiModelProperty(notes = "记事本")
    private String comment;

    @ApiModelProperty(notes = "记事本修改时间")
    private Date commentUpdateTime;

    @ApiModelProperty(notes = "操作时间")
    private Date operatorTime;

    @ApiModelProperty("流转日期")
    private Date transferDate;

    @ApiModelProperty(notes = "最近通话:电话XX 联系人|关系")
    private String latelyCallLog;

    @ApiModelProperty(notes = "公共字段标识")
    @Enumerated(EnumType.STRING)
    private PublicCaseFlag publicCaseFlag;

    @ApiModelProperty(value = "更新人")
    private String updatePersonName;

    @ApiModelProperty(value = "更新时间")
    private Date updateDate;

    @ApiModelProperty(notes = "委案日期")
    private Date delegationDate;

    @ApiModelProperty(notes = "退案日期")
    private Date endCaseDate;

    @ApiModelProperty(value = "最新联络结果")
    private String lastContactResult;

    @ApiModelProperty(value = "最新联络时间")
    private Date lastContactDate;

    @ApiModelProperty(value = "是否重点跟进")
    @Enumerated(EnumType.STRING)
    private BaseSelect isImportant;

    @ApiModelProperty(value = "案件结清时间")
    private Date clearDate;

    @ApiModelProperty(value = "策略ID")
    private String strategyId;

    @ApiModelProperty(value = "案件类型")
    @Enumerated(EnumType.STRING)
    private CaseType caseType;

}
